//string 数据插入
#include <iostream>
#include <string>

using namespace std;

int main()
{
    string s1="heword";

    //在索引2的位置插入两个“l”
    s1.insert(2,2,'l');
    cout<<s1<<endl;

    //在索引4的位置插入字符串
    s1.insert(4,"o");
    cout<<s1<<endl;

    //在字符串末尾插入"NUAA"
    s1.insert(s1.size(),"NUAA");
    cout<<s1<<endl;

    //在字符串开头插入':'
    s1.insert(s1.begin(),':');
    cout<<s1<<endl;

    return 0;
}